#include <stdio.h>
main(int argc, char *argv[]) {
    int c;
    while ((c = getchar()) != EOF) {
        printf("%d", c != EOF);
        putchar(c);
        printf("\n");
    }
    printf("\n%d\n", c != EOF);
    printf("%d\n", c);
    printf("%d\n", EOF);
}